package com.itheima.article.feign;

import com.itheima.article.pojo.ApAuthor;
import com.itheima.common.vo.ResultVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.print.attribute.standard.MediaSize;

@FeignClient(name = "leadnews-article",contextId = "ApAuthorFeign")
public interface ApAuthorFeign {

    @GetMapping("/api/apAuthor/{apUserId}/{wmUserId}")
    ResultVo<ApAuthor> getByApUserIdWmUserId(
            @PathVariable(name = "apUserId")Long apUserId,
            @PathVariable(name = "wmUserId")Long wmUserId);


    @PostMapping("/api/apAuthor/add")
    ResultVo add(@RequestBody ApAuthor apAuthor);
}
